<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{    
    protected function _initDb()
    {
        $params = $this->getOption('db');
        $params['driver_options'] = $pdoParams;
        $db = Zend_Db::factory('Pdo_Mysql', $params);        
        $db->setFetchMode(Zend_Db::FETCH_ASSOC);
        $db->query("SET NAMES 'UTF8'");
        Zend_Registry::set('DB',$db);
        //Khi thiet lap che do nay model moi co the su dung duoc
        Zend_Db_Table::setDefaultAdapter($db);
        
        // Return it, so that it can be stored by the bootstrap
        return $db;
    }
    protected function _initStartSession()
    {
            Zend_Session::start();
    }
    protected function _initRouter(){        
     
    }
    protected function _initLocale()
    {
        $locale = new Zend_Locale(Zend_Locale::BROWSER);
        Zend_Registry::set(H_G::SITE_LOCALE, $locale);
    }
    protected function _initView(){
        $view = new H_View();
        $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
        $viewRenderer->setView($view);
        Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
        Zend_Registry::set("ZEND_VIEW_KEY", $view);
    }    
}

